//
// Created by wze-zero on 2024/7/14 014.
//
#include <iostream>

using namespace std;

int mystrcmp(const char* src, const char* dst);

int main() {
    char s1[100];
    char s2[100];
    cin.getline(s1, sizeof(s1));
    cin.getline(s2, sizeof(s2));
    int ret = mystrcmp(s1, s2);
    cout << ret << endl;
    return 0;
}

int mystrcmp(const char* src, const char* dst) {
   char *s1= (char *) src;
   char *s2= (char *) dst;
    while (*s1!='\0'&&*s2!='\0'){
        if (*s1>*s2){
            return 1;
        } else if (*s1<*s2){
            return -1;
        }
        s1++;
        s2++;
    }
    if (*s1!='\0'){
        return 1;
    } else if (*s2!='\0'){
        return -1;
    } else{
        return 0;
    }
}